﻿
namespace CmdArgs
{
    using System.Collections.Generic;
    using System.ComponentModel;
    using CmdArgs.Utils;

    /// <summary>
    /// Data structure for result of parsing command line arguments.
    /// It contains list of parsed options and list of ordinary arguments.
    /// </summary>
    [ImmutableObject(true)]
    public class CommandLineArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CommandLineArgs"/> class.
        /// </summary>
        /// <param name="options">The options dictionary.</param>
        /// <param name="arguments">The ordinary arguments.</param>
        public CommandLineArgs(OptionsDictionary options, IEnumerable<string> arguments)
        {
            this.Options = options;
            this.Arguments = arguments.Copy();
        }

        /// <summary>
        /// Gets the list of parsed options.
        /// </summary>
        public OptionsDictionary Options { get; private set; }

        /// <summary>
        /// Gets the list of ordinary arguments.
        /// </summary>
        public IEnumerable<string> Arguments { get; private set; }
    }
}
